package com.etc.entity;

import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Objects;

/**
 * (Type)实体类
 *
 * @author makejava
 * @since 2021-10-18 22:32:00
 */
@Component
public class Type  {
    private static final long serialVersionUID = 457169060913489984L;
    /**
     * 分类
     */
    private String typeId;
    /**
     * 分类名
     */
    private String typeName;


    private List<Room> roomList;

    private List<Video> videoList;

    public List<Video> getVideoList() {
        return videoList;
    }

    public void setVideoList(List<Video> videoList) {
        this.videoList = videoList;
    }

    public List<Room> getRoomList() {
        return roomList;
    }

    public void setRoomList(List<Room> roomList) {
        this.roomList = roomList;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Type() {
    }

    public Type(String typeId, String typeName, List<Room> roomList) {
        this.typeId = typeId;
        this.typeName = typeName;
        this.roomList = roomList;
    }

    public Type(String typeId, String typeName) {
        this.typeId = typeId;
        this.typeName = typeName;
    }

    public Type(String typeId, String typeName, List<Room> roomList, List<Video> videoList) {
        this.typeId = typeId;
        this.typeName = typeName;
        this.roomList = roomList;
        this.videoList = videoList;
    }

    @Override
    public String toString() {
        return "Type{" +
                "typeId='" + typeId + '\'' +
                ", typeName='" + typeName + '\'' +
                ", roomList=" + roomList +
                ", videoList=" + videoList +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Type type = (Type) o;
        return Objects.equals(typeId, type.typeId) &&
                Objects.equals(typeName, type.typeName) &&
                Objects.equals(roomList, type.roomList) &&
                Objects.equals(videoList, type.videoList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(typeId, typeName, roomList, videoList);
    }

    public Type(String typeId) {
        this.typeId = typeId;
    }
}

